<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>UEditor-ThinkPHP集成</title>
<!-- 配置文件 -->
<script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/ueditor/ueditor.all.js"></script>
<!--建议手动加载语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="/ueditor/lang/zh-cn/zh-cn.js"></script>

    <script>
    $(function(){
        var url='<?php echo U('Admin/Ueditor/Index');?>';
        //var ue = UE.getEditor('container');
        
        var ue = UE.getEditor('container',{
            serverUrl :url,
            UEDITOR_HOME_URL:'/ueditor/',
        });

        ue.ready(function(){
            ue.execCommand('serverparam', {
                'userid': '1',
               'username': 'admin',
            });
        });

    });
    </script>
</head>
<body>
    <form action="<?php echo U('Admin/Index/add');?>" method="post">
        <script id="container" name="content" type="text/plain"></script>
        
        <input type="submit" value="提交" />
    </form>
</body>
</html>